/PROG  TESTCDJ0923
/ATTR
OWNER		= MNEDITOR;
COMMENT		= "DES TEST";
PROG_SIZE	= 3211;
CREATE		= DATE 20-09-24  TIME 11:03:04;
MODIFIED	= DATE 20-09-24  TIME 11:03:04;
FILE_NAME	= PNS0080;
VERSION		= 0;
LINE_COUNT	= 109;
MEMORY_SIZE	= 3695;
PROTECT		= READ_WRITE;
TCD:  STACK_SIZE	= 0,
      TASK_PRIORITY	= 50,
      TIME_SLICE	= 0,
      BUSY_LAMP_OFF	= 0,
      ABORT_REQUEST	= 0,
      PAUSE_REQUEST	= 0;
DEFAULT_GROUP	= 1,*,*,*,*;
CONTROL_CODE	= 00000000 00000000;
/APPL
/MN
   1:  !******************************** ;
   2:  !     COSMA METAL FORMING  ;
   3:  !******************************** ;
   4:  !  LINE: CHINA CHANGSHA ;
   5:  !  ROBOT: RL1 ;
   6:  !  PROGRAM: PNS0060 ;
   7:  !  PART:51942367  ;
   8:  !******************************** ;
   9:   ;
  10:  !INITIALIZE ;
  11:  MOVE TO HOME    ;
  12:  R[14]=90    ;
  13:  R[18]=1    ;
  14:  R[19]=.3    ;
  15:  R[35]=TIMER[4]    ;
  16:  !------------------------------- ;
  17:  !BEGINNING OF PROGRAM ;
  18:  CALL PARTDROP    ;
  19:  COL GUARD ADJUST R[14] ;
  20:  UTOOL_NUM=1 ;
  21:  UFRAME_NUM=0 ;
  22:  PAYLOAD[1] ;
  23:  CALL ARM_CHECK    ;
  24:  !INITIATE TO PICK-POUNCE ;
  25:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  26:J P[2:PICK POUNCE] 50% CNT100 ACC100    ;
  27:   ;
  28:  R[1]=0    ;
  29:  TIMER[1]=RESET ;
  30:  TIMER[1]=START ;
  31:   ;
  32:  LBL[10:TOP OF LOOF] ;
  33:J P[16] 70% CNT100    ;
  34:J P[17] 70% CNT100    ;
  35:   ;
  36:   ;
  37:  TIMER[2]=STOP ;
  38:  R[1]=R[1]+1    ;
  39:  R[2]=TIMER[2]    ;
  40:  R[3]=60/R[2]    ;
  41:  TIMER[2]=RESET ;
  42:  TIMER[2]=START ;
  43:   ;
  44:  !PROCEED TO PICK ;
  45:  LBL[20] ;
  46:  IF DI[1]=ON AND DI[3]=ON,JMP LBL[25] ;
  47:  IF DI[29]=ON,JMP LBL[90] ;
  48:  JMP LBL[20] ;
  49:   ;
  50:  LBL[25] ;
  51:J P[3:PICK APPROACH] 100% CNT70 ACC100    ;
  52:  DO[1]=OFF ;
  53:J P[4:PICK] 100% CNT0 TB R[18]sec,CALL PARTPICK ACC100 BREAK    ;
  54:  PAYLOAD[2] ;
  55:   ;
  56:J P[5:PICK DEPART] 100% CNT100 ACC100    ;
  57:J P[7:PICK CLEAR] 100% CNT100 ACC100    ;
  58:  DO[1]=ON ;
  59:  DO[8]=PULSE,0.5sec ;
  60:  LBL[30:GOTO DROP POUNCE] ;
  61:J P[15] 100% CNT100    ;
  62:J P[8:DROP POUNCE] 100% CNT100 ACC100    ;
  63:   ;
  64:  LBL[40:AT DROP POUNCE] ;
  65:  IF DI[2]=ON AND DI[4]=ON,JMP LBL[80] ;
  66:  IF DI[7]=ON AND DI[2]=ON,JMP LBL[50] ;
  67:  IF DI[18]=ON,JMP LBL[60] ;
  68:  JMP LBL[40] ;
  69:   ;
  70:  LBL[50:MOVE DROP SNEAK] ;
  71:  OVERRIDE=R[5] ;
  72:J P[9:DROP SNEAK] 100% CNT100 ACC100    ;
  73:  LBL[51:DROP OR C-P-S] ;
  74:  IF DI[2]=ON AND DI[4]=ON AND DI[5]=ON,JMP LBL[80] ;
  75:  IF DI[18]=ON,JMP LBL[40] ;
  76:  JMP LBL[51] ;
  77:  JMP LBL[50] ;
  78:   ;
  79:  LBL[60:MOVE CLS-PRS-ACC] ;
  80:J P[1:MIDDLE] 50% CNT100 ACC100    ;
  81:  PAUSE ;
  82:  JMP LBL[30] ;
  83:   ;
  84:  LBL[80:DROP ENABLED] ;
  85:  !PROCEED TO DROP ;
  86:  TIMER[4]=RESET ;
  87:  TIMER[4]=START ;
  88:   ;
  89:  DO[4]=OFF ;
  90:  OVERRIDE=R[5] ;
  91:J P[10:DROP APPROACH] 100% CNT35 ACC100    ;
  92:J P[11:DROP] 100% CNT5 TB R[19]sec,CALL PARTDROP ACC100 BREAK    ;
  93:  PAYLOAD[1] ;
  94:  CALL CHK_DROP    ;
  95:J P[12:DROP DEPART] 100% CNT100 ACC110    ;
  96:  TIMER[4]=STOP ;
  97:J P[13:DROP CLEAR] 100% CNT100 ACC110    ;
  98:  !GOTO PICK POUNCE ;
  99:J P[2:PICK POUNCE] 100% CNT100 ACC100    ;
 100:  IF DI[29]=ON,JMP LBL[90] ;
 101:  JMP LBL[10] ;
 102:   ;
 103:  LBL[90:END OF CYCLE] ;
 104:  TIMER[1]=STOP ;
 105:  R[4]=TIMER[1]    ;
 106:J P[1:MIDDLE] 50% CNT100    ;
 107:  MOVE TO HOME    ;
 108:   ;
 109:  LBL[100:END OF PROGRAM] ;
/POS
P[1:"MIDDLE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2642.493  mm,	Y =  -503.314  mm,	Z =  -886.412  mm,
	W =   179.994 deg,	P =      .009 deg,	R =   -89.999 deg
};
P[2:"PICK POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2781.740  mm,	Y =   114.515  mm,	Z =  -799.899  mm,
	W =   179.993 deg,	P =      .006 deg,	R =   -89.999 deg
};
P[3:"PICK APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, -1',
	X =  1985.396  mm,	Y =  2869.440  mm,	Z =   -62.157  mm,
	W =   175.291 deg,	P =    -2.042 deg,	R =    99.497 deg
};
P[4:"PICK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, -1',
	X =  1985.395  mm,	Y =  2869.440  mm,	Z =  -217.677  mm,
	W =   175.291 deg,	P =    -2.042 deg,	R =    99.498 deg
};
P[5:"PICK DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, -1',
	X =  1985.396  mm,	Y =  2869.440  mm,	Z =   -62.157  mm,
	W =   175.291 deg,	P =    -2.042 deg,	R =    99.497 deg
};
P[7:"PICK CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, -1',
	X =  1433.151  mm,	Y =  1454.774  mm,	Z =  -454.220  mm,
	W =   177.721 deg,	P =     2.758 deg,	R =   175.857 deg
};
P[8:"DROP POUNCE"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2642.491  mm,	Y =  -861.393  mm,	Z =  -901.000  mm,
	W =   179.994 deg,	P =      .009 deg,	R =   -89.999 deg
};
P[9:"DROP SNEAK"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2835.747  mm,	Y = -2153.753  mm,	Z =  -948.421  mm,
	W =  -179.431 deg,	P =      .445 deg,	R =   -89.816 deg
};
P[10:"DROP APPROACH"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2663.142  mm,	Y = -2864.769  mm,	Z =  -978.264  mm,
	W =  -178.973 deg,	P =      .477 deg,	R =   -89.674 deg
};
P[11:"DROP"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2663.142  mm,	Y = -2864.770  mm,	Z = -1050.743  mm,
	W =  -178.973 deg,	P =      .477 deg,	R =   -89.674 deg
};
P[12:"DROP DEPART"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2663.142  mm,	Y = -2864.770  mm,	Z =  -962.744  mm,
	W =  -178.973 deg,	P =      .477 deg,	R =   -89.674 deg
};
P[13:"DROP CLEAR"]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  2944.545  mm,	Y = -1524.379  mm,	Z =  -973.183  mm,
	W =   179.776 deg,	P =      .060 deg,	R =   -89.919 deg
};
P[15]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1758.608  mm,	Y =   947.759  mm,	Z =  -693.566  mm,
	W =   179.935 deg,	P =     3.576 deg,	R =  -145.591 deg
};
P[16]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, 0',
	X =  1758.608  mm,	Y =   947.759  mm,	Z =  -693.566  mm,
	W =   179.935 deg,	P =     3.576 deg,	R =  -145.591 deg
};
P[17]{
   GP1:
	UF : 0, UT : 1,		CONFIG : 'N U T, 0, 0, -1',
	X =  1433.151  mm,	Y =  1454.774  mm,	Z =  -454.220  mm,
	W =   177.721 deg,	P =     2.758 deg,	R =   175.857 deg
};
/END
